package AEF::AEFProcessor;

use Modern::Perl;
use Moose;

has doneProcessing => (is => 'rw', isa => 'Bool', default => 0);

# figure out if we want the data for this type of entry
sub RequireDataForType
{
	my $self = shift;
	my $type = shift;
	if($type == 0xffff)
	{
		$self->doneProcessing(1);
		return 0;
	}
	return 1;
}

has 'typeFormats' => ( 
	is => 'rw', 
	isa => 'HashRef[Str]',
	# default type tranlations
	default => sub { 
		{
			0x2 => 'Z*', 
			0x4 => 'Z*', 
			0x0a => 'C',
			0x0b => 'C',
			0x10f => 'CCCCCCCCC',
			0x20 => 'Z*', 
			0x40 => 'Z*',
			0x41 => 'Z*',
		};
	}
);

sub TypeMap
{
	my $self = shift;
	my $type = shift;
	return $self->typeFormats->{$type};
}


# do something with the data
sub ProcessBlock
{
	my $self = shift;
	my ($type, $data_chunk, $ptr, $length) = @_;
}


1;

no Moose;

